#include "DiffuseMaterial.h"
#include "Integrator.h"

Color DiffuseMaterial::shade(const Scene * scene, const Ray & ray, const IntersectResult &intersect, const TraceState & traceState) const {
	Color diffuse = material ? material->shade(scene, ray, intersect, traceState) : Colors::White;
	diffuse = scene->getIntegrator()->getIrradiance(scene, intersect.position, intersect.normal/*intersect.getReflectNormal(ray.dir)*/, traceState, diffuse);
	return diffuse *= strength;
}
